<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>data structures relation to image | Matrix207&#39;s Blog</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="What it isds2img.py (DataStructure To Image) 
A python script transfer c header file which contains lots of data structuresto a dot script, and then use dot to convert to a image file
How to runUsage:">
<meta property="og:type" content="article">
<meta property="og:title" content="data structures relation to image">
<meta property="og:url" content="http://yoursite.com/2014/07/28/data-structures-relation-to-image/index.html">
<meta property="og:site_name" content="Matrix207's Blog">
<meta property="og:description" content="What it isds2img.py (DataStructure To Image) 
A python script transfer c header file which contains lots of data structuresto a dot script, and then use dot to convert to a image file
How to runUsage:">
<meta property="og:image" content="http://yoursite.com/assets/image/posts/iscsi_kernel_structs.png">
<meta property="og:updated_time" content="2016-07-17T14:33:54.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="data structures relation to image">
<meta name="twitter:description" content="What it isds2img.py (DataStructure To Image) 
A python script transfer c header file which contains lots of data structuresto a dot script, and then use dot to convert to a image file
How to runUsage:">
<meta name="twitter:image" content="http://yoursite.com/assets/image/posts/iscsi_kernel_structs.png">
  
    <link rel="alternate" href="/atom.xml" title="Matrix207&#39;s Blog" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link rel="stylesheet" href="/css/style.css">
  

</head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Matrix207&#39;s Blog</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="Flux RSS"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Rechercher"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" results="0" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://yoursite.com"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-data-structures-relation-to-image" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2014/07/28/data-structures-relation-to-image/" class="article-date">
  <time datetime="2014-07-27T16:00:00.000Z" itemprop="datePublished">2014-07-28</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/tools/">tools</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      data structures relation to image
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h3 id="What-it-is"><a href="#What-it-is" class="headerlink" title="What it is"></a>What it is</h3><p><strong>ds2img</strong>.py (DataStructure To Image) </p>
<p>A python script transfer c header file which contains lots of data structures<br>to a dot script, and then use dot to convert to a image file</p>
<h3 id="How-to-run"><a href="#How-to-run" class="headerlink" title="How to run"></a>How to run</h3><pre><code>Usage: ds2imgpy -i INPUT_FILE -f png|svg -o OUTPUT_FILE [-d DOT_FILE]

-i  input file which have structures&quot;
-f  image fomat, only support png and svg&quot;
-o  output file, image file&quot;
-d  dot script file, default is tmp.dot&quot;

e.g:

python ds2img.py -i t.h -f png -o t.png 
</code></pre><h3 id="TODO"><a href="#TODO" class="headerlink" title="TODO"></a>TODO</h3><p>Waiting for your advices</p>
<h3 id="Warning"><a href="#Warning" class="headerlink" title="Warning"></a>Warning</h3><ol>
<li>Not support structure contain other structure!</li>
<li>Not support multi-lines comment</li>
</ol>
<h3 id="Source"><a href="#Source" class="headerlink" title="Source"></a>Source</h3><p>You can get the latest version from:<br><a href="https://github.com/matrix207/scripts/blob/master/ds2img/ds2img.py" target="_blank" rel="external">https://github.com/matrix207/scripts/blob/master/ds2img/ds2img.py</a></p>
<pre><code>#!/usr/bin/python
#####################################################################
# Generate dot script file from c file, which have lots of structures
#
# You can get the latest version from: 
# https://github.com/matrix207/scripts/blob/master/ds2img/ds2img.py
#
# Warning: Not support structure contain other structure!
# 
# Depends:
#     1. python
#     2. graphviz
#
# History:
#    v1.0  2014-07-28  Dennis  implement generate_relation function
#                              add parse option funtion
#    v0.1  2014-07-27  Dennis  Create
#####################################################################

import os
import re
import sys
import getopt
import datetime

version = &quot;v1.0 Create by Dennis 2014-07-28&quot;
debug = 0

def is_comment(line):
    if &apos;\\&apos; in line:
        return true
    print true

# process each line
def process(line):
    print line,

def get_struct_name(line):
    print line,

def get_datetime():
    today = datetime.datetime.now()
    print today.strftime(&apos;%Y-%m-%d %H:%M:%S&apos;)

def generate_dot_header(output_file):
    if debug : 
        print &quot;generating dot header&quot;
    f=open(output_file,&apos;a+&apos;)
    print&gt;&gt;f, &quot;/**********************************************&quot;
    print&gt;&gt;f, &quot;* Auto generate by ds2img.py&quot;
    print&gt;&gt;f, &quot;* Author:  matrix207&quot;
    print&gt;&gt;f, &quot;* Date  :  %s&quot; % datetime.datetime.now().strftime(&apos;%Y-%m-%d %H:%M:%S&apos;)
    print&gt;&gt;f, &quot;**********************************************/\n&quot;
    print&gt;&gt;f, &quot;digraph DS2IMG {&quot;
    print&gt;&gt;f, &quot;    node [shape=record fontsize=12 fontname=Courier style=filled];&quot;
    print&gt;&gt;f, &quot;    edge[color=blue]; rankdir=LR;&quot;
    print&gt;&gt;f, &quot;&quot;
    f.close()

def generate_dot_end(output_file):
    if debug : 
        print &quot;generating dot end&quot;
    f=open(output_file,&apos;a+&apos;)
    print&gt;&gt;f, &quot;}&quot;
    f.close()

def generate_struct_header(output_file, struct_name):
    if debug : 
        print &quot;generating struct header&quot;
    f=open(output_file,&apos;a+&apos;)
    print&gt;&gt;f, &quot;subgraph cluster_%s {&quot; % struct_name
    print&gt;&gt;f, &quot;    node [shape=record fontsize=12 fontname=Courier style=filled];&quot;
    print&gt;&gt;f, &quot;    color = lightgray; style=filled; label = \&quot;struct %s \&quot;; edge[color=\&quot;#2e3436\&quot;];&quot; % struct_name
    print&gt;&gt;f, &quot;    node_%s [shape=record label=\&quot;&lt;f0&gt;*** struct %s ***\\&quot; % (struct_name, struct_name)
    f.close()

def generate_struct_member(output_file, index, member_name):
    if debug : 
        print &quot;generating struct member&quot;
    f=open(output_file,&apos;a+&apos;)
    print&gt;&gt;f, &quot;|&lt;f%d&gt;%s\\n\\&quot; % (index, member_name)
    f.close()

def generate_struct_end(output_file):
    if debug : 
        print &quot;generating struct end&quot;
    f=open(output_file,&apos;a+&apos;)
    print&gt;&gt;f, &quot;\&quot;];&quot;
    print&gt;&gt;f, &quot;}&quot;
    print&gt;&gt;f, &quot;&quot;
    f.close()

def generate_relation(output_file, structs_name, structs):
    if debug : 
        print &quot;generating relation&quot;
    f=open(output_file,&apos;a+&apos;)
    print&gt;&gt;f, &quot;#relation &quot;
    # structs_name contain all structure name 
    # structs      contain all structures, include structure name and it&apos;s member name
    for a in structs_name:           # structs_name[a] is structure name
        for b in structs:            # b is structure name 
            for c in structs[b]:     # c is member index, structs[b][c] is member name
                # only match structure name
                tmp = structs[b][c].split(&apos; &apos;)
                #if structs_name[a] in structs[b][c]:
                if tmp[1]==structs_name[a]:
                    #print &quot;%s contain %s\n&quot; % (b,structs_name[a])
                    #print &quot;%s:&lt;f%d&gt; -&gt; %s:f0\n&quot; % (b,c,structs_name[a])
                    print&gt;&gt;f, &quot;node_%s:&lt;f%d&gt; -&gt; node_%s:f0;&quot; % (b,c,structs_name[a])
    print&gt;&gt;f, &quot;&quot;
    f.close()

def clean_multi_space(line):
    line = re.sub(r&apos; +&apos;, &apos; &apos;, line)
    return line

def clean_array_size(line):
    line = re.sub(r&apos;\[.+\]&apos;, &apos;[]&apos;, line)
    return line

def clean_specify_dirty(line):
    line = re.sub(r&apos;\[.+&lt;&lt;.+\]&apos;, &apos;[]&apos;, line)
    return line

# handle line which has comment information
def handle_comment(line):
    pos = line.find(&quot;/*&quot;)
    if pos &gt; 0:
        line = re.sub(r&apos;/\*.+\*/&apos;, &apos;&apos;, line)
        line = line.strip()
    return line

def struct2dot(input_file, output_file):
    generate_dot_header(output_file)
    reader = open(input_file, &apos;r&apos;)
    i = 1
    structs = {}
    structs_name = {}
    while True: 
        line = reader.readline()
        if not line: 
            break
        # skip the comment line
        pos = line.find(&quot;/&quot;)
        if pos == 0:
            continue
        if pos &gt; 0:
            handle_comment(line)
        m = re.match(&apos;^struct (\w+) {$&apos;,line)
        if m: # Find structure start
            structs_name[i] = m.group(1)
            st_name = m.group(1)
            i += 1
            generate_struct_header(output_file, m.group(1))
            structs[m.group(1)] = {}
            j = 1
            while True:
                line = reader.readline()
                if not line: 
                    break
                line = line.strip();
                if len(line) == 0:
                    continue
                # skip the comment line
                pos = line.find(&quot;/&quot;)
                if pos == 0:
                    continue
                if pos &gt; 0:
                    line = handle_comment(line)
                line = clean_specify_dirty(line)
                line = clean_multi_space(line)
                m = re.match(&apos;^};$&apos;,line)
                if m: # Find structure end
                    generate_struct_end(output_file)
                    break
                structs[st_name][j] = line
                generate_struct_member(output_file, j, line)
                j += 1
    reader.close()
    generate_relation(output_file, structs_name, structs)
    generate_dot_end(output_file)

def dot2png(input_file, output_file):
    cmdline = &quot;dot -Tpng &quot; + input_file + &quot; -o &quot; + output_file
    if debug:
        print cmdline
    os.system(cmdline)

def clean_file(input_file):
    cmdline = &quot;&gt; &quot; + input_file
    os.system(cmdline)

# Test Function
def test(input_file, output_file):
    #find_comment(sys.argv[1])
    generate_dot_header(output_file)
    generate_struct_header(output_file, &quot;func_test&quot;)
    generate_struct_member(output_file, 1, &quot;int test_a_13;&quot;)
    generate_struct_member(output_file, 2, &quot;int test_a_13;&quot;)
    generate_struct_member(output_file, 3, &quot;int test_a_13;&quot;)
    generate_struct_end(output_file)
    generate_dot_end(output_file)

def find_comment(input_file):
    reader = open(input_file, &apos;r&apos;)
    while True:
        line = reader.readline()
        if len(line) == 0:
            break
        pos = line.find(&quot;/*&quot;)
        if pos&gt;=0:
            print line,
    reader.close()

def usage(bin_file):
    print &quot;Usage: %s -i INPUT_FILE -f png|svg -o OUTPUT_FILE [-d DOT_FILE]&quot; % bin_file
    print &quot;      -i  input file which have structures&quot;
    print &quot;      -f  image fomat, only support png and svg&quot;
    print &quot;      -o  output file, image file&quot;
    print &quot;      -d  dot script file, default is tmp.dot&quot;
    print &quot;  e.g:\n\tpython %s -i t.h -f png -o t.png&quot; % bin_file
    sys.exit(1)

if __name__ == &apos;__main__&apos;:
    paramlen = len(sys.argv)

    config = {  
        &quot;input&quot;:&quot;&quot;,  
        &quot;format&quot;:&quot;&quot;,  
        &quot;output&quot;:&quot;&quot;,  
        &quot;dotfile&quot;:&quot;tmp.dot&quot;,  
    }      
    opts, args = getopt.getopt(sys.argv[1:], &apos;hi:f:o:d:&apos;,
        [  
        &apos;input=&apos;,
        &apos;format=&apos;,
        &apos;output=&apos;,
        &apos;dotfile=&apos;,
        &apos;help&apos;  
        ]  
    )    

    for option, value in opts:  
        if  option in [&quot;-h&quot;,&quot;--help&quot;]:  
            usage(sys.argv[0])
        elif option in [&apos;--input&apos;, &apos;-i&apos;]:  
            config[&quot;input&quot;] = value  
        elif option in [&apos;--output&apos;, &apos;-o&apos;]:  
            config[&quot;output&quot;] = value  
        elif option in [&apos;--format&apos;, &apos;-f&apos;]:  
            config[&quot;format&quot;] = value  
        elif option in [&apos;--dotfile&apos;, &apos;-d&apos;]:  
            config[&quot;dotfile&quot;] = value  
        else:
            usage(sys.argv[0])

    if config[&quot;input&quot;] == &quot;&quot; or config[&quot;output&quot;]==&quot;&quot; or config[&quot;format&quot;]==&quot;&quot; :
        usage(sys.argv[0])


    clean_file(config[&quot;dotfile&quot;])

    struct2dot(config[&quot;input&quot;], config[&quot;dotfile&quot;])

    # generate graphic
    filename = os.path.basename(sys.argv[1]) 
    png_file = filename + &quot;.png&quot;
    dot2png(config[&quot;dotfile&quot;], config[&quot;output&quot;])

    print &quot;Done&quot;
</code></pre><h3 id="example"><a href="#example" class="headerlink" title="example"></a>example</h3><p>transfer iscsitarget-1.4.20/kernel/iscsi.h </p>
<pre><code>[dennis@localhost kernel]$ pwd
/home/dennis/work/git/iet/src/iscsitarget-1.4.20/kernel
[dennis@localhost kernel]$ ds2img.py -i iscsi.h -f png -o iscsi.png
Done
[dennis@localhost kernel]$ ds2img.py -i iscsi.h -f svg -o iscsi.svg
Done
</code></pre><p><img src="/assets/image/posts/iscsi_kernel_structs.png" alt=""></p>
<h3 id="Reference"><a href="#Reference" class="headerlink" title="Reference"></a>Reference</h3><ul>
<li><a href="http://emacser.com/emacs_graphviz_ds.htm" target="_blank" rel="external">★★★使用graphviz画数据结构</a></li>
<li><a href="http://www.graphviz.org/content/datastruct" target="_blank" rel="external">graphviz for Data Structures</a></li>
<li><a href="http://gashero.iteye.com/blog/1748795" target="_blank" rel="external">使用graphviz dot来画图表</a></li>
<li><a href="http://www.cnblogs.com/huxi/archive/2010/07/04/1771073.html" target="_blank" rel="external">Python正则表达式指南</a></li>
<li><a href="http://blog.csdn.net/wangyezi19930928/article/details/25652295" target="_blank" rel="external">★★python文件操作字符串操作总结</a></li>
<li><a href="http://zhidao.baidu.com/link?url=lwqlXGEAznkWAc26v929RcbA-TuG_McqeQ2BgRWWXaiNS2KQPfU4LR-QdmJkn3eWb5Bfn6qA_7wAboaFThjUkSznQi432soyDnXbd3vPxWO" target="_blank" rel="external">用python如何匹配注释</a></li>
<li><a href="http://blog.csdn.net/xmnathan/article/details/4192821" target="_blank" rel="external">Python文件去除注释</a></li>
<li><a href="http://5iqiong.blog.51cto.com/2999926/806230" target="_blank" rel="external">★★★遍历python字典几种方法</a></li>
<li><a href="http://www.cnblogs.com/skyhacker/archive/2012/01/27/2330177.html" target="_blank" rel="external">python循环遍历字典元素</a></li>
<li><a href="http://blog.csdn.net/nrs12345/article/details/4869272" target="_blank" rel="external">Python的字典操作</a></li>
<li><a href="http://blog.csdn.net/feixin620/article/details/4209783" target="_blank" rel="external">★★★python解析ini文件</a></li>
<li><a href="http://blog.csdn.net/xiaocaiju/article/details/7590106" target="_blank" rel="external">python_getopt解析命令行输入参数的使用</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2014/07/28/data-structures-relation-to-image/" data-id="ciqqpe1qe00a3nmpv0yx1jmyr" class="article-share-link">Partager</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/graphviz/">graphviz</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/iscsi/">iscsi</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/python/">python</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/tools/">tools</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2014/07/30/linux-io-performance-monitor/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Récent</strong>
      <div class="article-nav-title">
        
          Linux IO performance monitor
        
      </div>
    </a>
  
  
    <a href="/2014/07/18/jni-on-linux/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Ancien</strong>
      <div class="article-nav-title">jni on linux</div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Catégories</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/blog/">blog</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/database/">database</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/english/">english</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/kernel/">kernel</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/language/">language</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/linux/">linux</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/math/">math</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/network/">network</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/others/">others</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/person/">person</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/program/">program</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/source/">source</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/storage/">storage</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/tools/">tools</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/windows/">windows</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Mot-clés</h3>
    <div class="widget">
      <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/FAQ/">FAQ</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/IRC/">IRC</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Translation/">Translation</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/android/">android</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/api/">api</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/assembly/">assembly</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/awk/">awk</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/batch/">batch</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/blog/">blog</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/book/">book</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/c/">c</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/c/">c++</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/cache/">cache</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/crash/">crash</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/database/">database</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/debug/">debug</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/dot/">dot</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/driver/">driver</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/emacs/">emacs</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/exploit/">exploit</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/file-system/">file system</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/filesystem/">filesystem</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/flowchart/">flowchart</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/gcc/">gcc</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/git/">git</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/google/">google</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/graphviz/">graphviz</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hexo/">hexo</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hosts/">hosts</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/iscsi/">iscsi</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/java/">java</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/javascript/">javascript</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/job/">job</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/json/">json</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/kernel/">kernel</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/linux/">linux</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/lisp/">lisp</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/lua/">lua</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/makefile/">makefile</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/malloc/">malloc</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/math/">math</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/maxima/">maxima</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/memory/">memory</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/memory-overflow/">memory overflow</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mtrace/">mtrace</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/netdisk/">netdisk</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/network/">network</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/others/">others</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/pandoc/">pandoc</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/performance/">performance</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/person/">person</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/protobuf/">protobuf</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/python/">python</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/rsync/">rsync</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/sed/">sed</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/shell/">shell</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/skype/">skype</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/sms/">sms</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/source/">source</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/ssh/">ssh</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/stack/">stack</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/storage/">storage</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/study/">study</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/svn/">svn</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/sync/">sync</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/test/">test</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/time/">time</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/tools/">tools</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/valgrind/">valgrind</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/vi/">vi</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/vim/">vim</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/virtual/">virtual</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/wget/">wget</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/windows/">windows</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/wireshark/">wireshark</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/write/">write</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/xml/">xml</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Nuage de mot-clés</h3>
    <div class="widget tagcloud">
      <a href="/tags/FAQ/" style="font-size: 10px;">FAQ</a> <a href="/tags/IRC/" style="font-size: 10px;">IRC</a> <a href="/tags/Translation/" style="font-size: 13px;">Translation</a> <a href="/tags/android/" style="font-size: 10px;">android</a> <a href="/tags/api/" style="font-size: 10px;">api</a> <a href="/tags/assembly/" style="font-size: 10px;">assembly</a> <a href="/tags/awk/" style="font-size: 11px;">awk</a> <a href="/tags/batch/" style="font-size: 14px;">batch</a> <a href="/tags/blog/" style="font-size: 10px;">blog</a> <a href="/tags/book/" style="font-size: 10px;">book</a> <a href="/tags/c/" style="font-size: 16px;">c</a> <a href="/tags/c/" style="font-size: 19px;">c++</a> <a href="/tags/cache/" style="font-size: 10px;">cache</a> <a href="/tags/crash/" style="font-size: 10px;">crash</a> <a href="/tags/database/" style="font-size: 17px;">database</a> <a href="/tags/debug/" style="font-size: 12px;">debug</a> <a href="/tags/dot/" style="font-size: 10px;">dot</a> <a href="/tags/driver/" style="font-size: 10px;">driver</a> <a href="/tags/emacs/" style="font-size: 11px;">emacs</a> <a href="/tags/exploit/" style="font-size: 10px;">exploit</a> <a href="/tags/file-system/" style="font-size: 10px;">file system</a> <a href="/tags/filesystem/" style="font-size: 12px;">filesystem</a> <a href="/tags/flowchart/" style="font-size: 10px;">flowchart</a> <a href="/tags/gcc/" style="font-size: 10px;">gcc</a> <a href="/tags/git/" style="font-size: 12px;">git</a> <a href="/tags/google/" style="font-size: 11px;">google</a> <a href="/tags/graphviz/" style="font-size: 11px;">graphviz</a> <a href="/tags/hexo/" style="font-size: 10px;">hexo</a> <a href="/tags/hosts/" style="font-size: 10px;">hosts</a> <a href="/tags/iscsi/" style="font-size: 14px;">iscsi</a> <a href="/tags/java/" style="font-size: 10px;">java</a> <a href="/tags/javascript/" style="font-size: 10px;">javascript</a> <a href="/tags/job/" style="font-size: 10px;">job</a> <a href="/tags/json/" style="font-size: 10px;">json</a> <a href="/tags/kernel/" style="font-size: 14px;">kernel</a> <a href="/tags/linux/" style="font-size: 14px;">linux</a> <a href="/tags/lisp/" style="font-size: 10px;">lisp</a> <a href="/tags/lua/" style="font-size: 10px;">lua</a> <a href="/tags/makefile/" style="font-size: 10px;">makefile</a> <a href="/tags/malloc/" style="font-size: 10px;">malloc</a> <a href="/tags/math/" style="font-size: 11px;">math</a> <a href="/tags/maxima/" style="font-size: 10px;">maxima</a> <a href="/tags/memory/" style="font-size: 11px;">memory</a> <a href="/tags/memory-overflow/" style="font-size: 10px;">memory overflow</a> <a href="/tags/mtrace/" style="font-size: 10px;">mtrace</a> <a href="/tags/netdisk/" style="font-size: 10px;">netdisk</a> <a href="/tags/network/" style="font-size: 20px;">network</a> <a href="/tags/others/" style="font-size: 18px;">others</a> <a href="/tags/pandoc/" style="font-size: 10px;">pandoc</a> <a href="/tags/performance/" style="font-size: 16px;">performance</a> <a href="/tags/person/" style="font-size: 11px;">person</a> <a href="/tags/protobuf/" style="font-size: 11px;">protobuf</a> <a href="/tags/python/" style="font-size: 10px;">python</a> <a href="/tags/rsync/" style="font-size: 10px;">rsync</a> <a href="/tags/sed/" style="font-size: 11px;">sed</a> <a href="/tags/shell/" style="font-size: 15px;">shell</a> <a href="/tags/skype/" style="font-size: 11px;">skype</a> <a href="/tags/sms/" style="font-size: 10px;">sms</a> <a href="/tags/source/" style="font-size: 11px;">source</a> <a href="/tags/ssh/" style="font-size: 10px;">ssh</a> <a href="/tags/stack/" style="font-size: 10px;">stack</a> <a href="/tags/storage/" style="font-size: 15px;">storage</a> <a href="/tags/study/" style="font-size: 10px;">study</a> <a href="/tags/svn/" style="font-size: 11px;">svn</a> <a href="/tags/sync/" style="font-size: 10px;">sync</a> <a href="/tags/test/" style="font-size: 11px;">test</a> <a href="/tags/time/" style="font-size: 10px;">time</a> <a href="/tags/tools/" style="font-size: 16px;">tools</a> <a href="/tags/valgrind/" style="font-size: 10px;">valgrind</a> <a href="/tags/vi/" style="font-size: 10px;">vi</a> <a href="/tags/vim/" style="font-size: 14px;">vim</a> <a href="/tags/virtual/" style="font-size: 11px;">virtual</a> <a href="/tags/wget/" style="font-size: 10px;">wget</a> <a href="/tags/windows/" style="font-size: 11px;">windows</a> <a href="/tags/wireshark/" style="font-size: 10px;">wireshark</a> <a href="/tags/write/" style="font-size: 13px;">write</a> <a href="/tags/xml/" style="font-size: 10px;">xml</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/07/">July 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/04/">April 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/03/">March 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/02/">February 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/01/">January 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/11/">November 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/10/">October 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/09/">September 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/08/">August 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/07/">July 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/06/">June 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/03/">March 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/02/">February 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/01/">January 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/12/">December 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/11/">November 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/09/">September 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/08/">August 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/07/">July 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/06/">June 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/05/">May 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/04/">April 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/03/">March 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/11/">November 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/10/">October 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/09/">September 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/08/">August 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/07/">July 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/06/">June 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/05/">May 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/04/">April 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/03/">March 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/02/">February 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/01/">January 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2012/12/">December 2012</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2012/09/">September 2012</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Articles récents</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2016/07/17/how-to-implement-malloc/">如何实现一个malloc</a>
          </li>
        
          <li>
            <a href="/2016/07/17/study-grep-more/">grep工作原理</a>
          </li>
        
          <li>
            <a href="/2016/07/17/2016-04-13-malloc/">malloc</a>
          </li>
        
          <li>
            <a href="/2016/04/27/include-what-you-use/">使用IWYU整理头文件引用</a>
          </li>
        
          <li>
            <a href="/2016/04/24/understand-gcc-assembly-output/">understand gcc assembly output</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2016 Matrix207<br>
      Propulsé by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/script.js"></script>

  </div>
</body>
</html>